Skip to content

fix(gateway): isolate CID and user-site content - #188

Merged
andersalm merged 2 commits into
developfrom
fix/168-content-sandbox
Oct 2, 2026
Merged

andersalm merged 2 commits into
developfrom
fix/168-content-sandbox

Conversation

@andersalm

Copy link
Copy Markdown
Contributor

CID and user-site pages currently run on Home’s origin. This change serves their routes with an opaque sandbox and blocks script API connections. The gateway also refuses opaque or cross-site Home/app API document and resource loads, while existing app fetches and ticketed terminal streams keep their authority checks.

Regression tests cover cached and provider content, every CID alias, site files and admitted bundles, cookie/storage/parent access, refused Home/app reads and writes, unchanged app state, and real form/frame/popup refusal. Chromium runs against the actual gateway router and checks the operator website’s tabs, assets, and command-selection recovery. CI runs the browser regression in the existing test job.

Validation on 6a4b279e0afaace3b35d2c02907a6a0d9b6cacb8:

  • Three focused Rust regressions and the real-gateway Chromium regression pass.
  • All 26 site/publication tests and 29 Browser close-handshake tests pass.
  • All four basic gates, Browser entropy, and JS syntax checks pass.
  • Independent review approved the final candidate in round two.

Refs #168 and #173. Target: develop, based on c9205a742ad612cfa3eedd39f2722df6966328e5. This proof covers direct gateway content; broader Origin, Host and Carrier bootstrap rules remain with #167. CI and irzhywau approval are required before a normal merge.

@andersalm

Copy link
Copy Markdown
Contributor Author

Independent adversarial review (Claude Opus, run by the operator for Anders, 2 October; different model family from the author).
VERDICT: PASS. All 9 CID and site routes get the sandbox CSP on every response, including redirects and errors; refused-case tests would fail without the fix.
Non-blocking, recorded for #177: the resource and navigation refusal covers /api/apps/ only; other /api routes rely on header tokens and SameSite=Strict; CSP cannot limit WebRTC.

@andersalm
andersalm merged commit b0d3f89 into develop Oct 2, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant